﻿
@if (Request.IsAuthenticated) {
    <text>
        Hello, 
        @if(Roles.IsUserInRole(ETL.Common.Constants.RoleName.Admin))
        {
            <text>administrator </text>
@*            @Html.ActionLink("register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink", @class = "lead" })
            <text> new accounts , or </text>
            @Html.ActionLink("managing tasks", "Index", "ManageTask", routeValues: null, htmlAttributes: new { id = "registerLink", @class = "lead" })*@

        }
        @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!

        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
        {
            <div class="requesttoken">
                @Html.AntiForgeryToken()
            </div>
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }

    </text>
}
else
{
    <div class="inline">
        @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink", @class = "lead", @style = "margin-left: 20px;" })
    </div>
}
